
//用户接口相关的函数
import request from "../untils/request.js"

/**
 * 
 * @param { post } data 
 *  
 */



//新建患者档案
export const addPatient = (data) => {
    return request.post("/outpatient/customerProfile", data)
}
//编辑账号
export const usersEdit = (data) => {
    return request.post("/outpatient/updateUser", data)
    }

//修改密码
export const editPwd = (data) => {
    return request.post("/users/editpwd",data)
}

//批量删除
export const batchDel = (data) =>{
    return request.post("/users/batchdel", data)
    }


/**
 * 
 * @param { get } params 
 *  
 */

//患者列表
export const patientsList = (params) => {
    return request.get("/outpatient/getListAll", { params } )
}

//修改用户头像
export const avatarEdit = (params) => {
    return request.get("/users/avataredit",{ params })
    }
//获取账号信息
export const usersInfo = () => {
    return request.get("/users/info")
    }

/**
 * 
 * DELETE  
 *  
 */   
//删除账号
export const usersDel = (data) => {
  return request.delete("/outpatient/deleteUser",{ data })
}

// 暴露
export default{
addPatient,
patientsList,
usersEdit,
usersDel,
usersInfo,
}